import { defineStore } from 'pinia'

const system = defineStore('system', {
  state: function () {
    return {
      version: '1.0.0',
      name: 'OSAdmin',
      MenuStatus: true,
      MenuClass: ['open'],
      isMobile: window.innerWidth < 991,
      logo: new URL('@/assets/logo.png', import.meta.url).href,
    }
  },
  getters: {},
  actions: {
    changeMenuStatus(status: boolean) {
      this.MenuStatus = status
      this.MenuClass = ['open', 'contrived']
    },

    changeIsMobile(status: boolean) {
      this.isMobile = status
    },
  }
})

export default system
